]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: Synthesize a new event with correct source for search
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 9 Jul 2014 10:06:40 +0000 (12:06 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 9 Jul 2014 10:23:30 +0000 (12:23 +0200)
We currently replay events that should start a search to the search
entry, which is fairly dodgy. Synthesize a new event with the correct
source actor instead, which is a bit less evil.

js/ui/viewSelector.js

index 918cd873a99c876d6cd79a757ad506a683a8784d..b743fa796aed8963f74880f87741cac01034ea23 100644 (file)
@@ -508,7 +508,10 @@ const ViewSelector = new Lang.Class({
 
     startSearch: function(event) {
         global.stage.set_key_focus(this._text);
-        this._text.event(event, true);
+
+        let synthEvent = event.copy();
+        synthEvent.set_source(this._text);
+        this._text.event(synthEvent, true);
     },
 
     // the entry does not show the hint